load("@rules_jvm_external//:defs.bzl", "artifact")
load("//java:defs.bzl", "JUNIT5_DEPS", "java_selenium_test_suite", "java_test_suite")

LARGE_TESTS = [
    "InternetExplorerDriverTest.java",
]

java_test_suite(
    name = "small-tests",
    size = "small",
    srcs = glob(
        ["*.java"],
        exclude = LARGE_TESTS,
    ),
    tags = [
        "requires-network",
    ],
    deps = [
        "//java/src/org/openqa/selenium/ie",
        "//java/src/org/openqa/selenium/json",
        "//java/src/org/openqa/selenium/remote",
        "//java/test/org/openqa/selenium/testing:annotations",
        artifact("org.junit.jupiter:junit-jupiter-api"),
        artifact("org.assertj:assertj-core"),
        artifact("org.mockito:mockito-core"),
    ] + JUNIT5_DEPS,
)

java_selenium_test_suite(
    name = "large-tests",
    size = "large",
    srcs = LARGE_TESTS,
    browsers = [
        "ie",
    ],
    deps = [
        "//java/src/org/openqa/selenium/ie",
        "//java/src/org/openqa/selenium/remote",
        "//java/test/org/openqa/selenium/testing:annotations",
        "//java/test/org/openqa/selenium/testing:test-base",
        "//java/test/org/openqa/selenium/testing/drivers",
        artifact("org.junit.jupiter:junit-jupiter-api"),
        artifact("org.assertj:assertj-core"),
    ] + JUNIT5_DEPS,
)
